package com.note.app;

import com.github.xiaoymin.knife4j.spring.annotations.EnableKnife4j;
import com.note.common.config.*;
import com.note.common.service.JiGuangSmsService;
import com.note.common.utils.JwtUtils;
import com.note.common.utils.RedisUtils;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Import;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * 笔记应用服务启动类
 * 提供用户管理、笔记管理等功能
 */

@EnableAsync
@EnableKnife4j
@SpringBootApplication
@EnableDiscoveryClient
@EnableTransactionManagement
@EnableFeignClients
@MapperScan("com.note.app.mapper")
@Import({RedisConfig.class,
        JedisPoolConfig.class,
        RedisUtils.class,
        JwtUtils.class,
        GatewaySecurityAutoConfiguration.class,
        GlobalCorsConfig.class,
        UserContextWebMvcConfig.class,
        JiGuangSmsService.class})
public class NoteAppApplication {
    public static void main(String[] args) {
        SpringApplication.run(NoteAppApplication.class, args);
    }
}
